<!--  -->
<template>
  <div>
    <h2>我是Home，哈哈</h2>
    <p>我是内容，哈哈</p>

    <br />
    <router-link to="/home/news">新闻</router-link>
    <router-link to="/home/message">消息</router-link>
    <keep-alive>
      <router-view></router-view>
    </keep-alive>
    <p>{{$store.state.counter}}</p>
  </div>
</template>

<script>
export default {
  name: "Home",
  data() {
    return {};
  },

  // 创建的时候调用
  created() {
    console.log("created");
  },

  // 销毁的时候，调用
  destroyed() {
    console.log("destroyed");
  },
};
</script>

<style  scoped>
</style>
